package carmesi.wizards;

import org.netbeans.api.java.project.JavaProjectConstants;
import org.netbeans.api.project.Project;
import org.netbeans.api.project.SourceGroup;
import org.netbeans.api.project.Sources;
import org.netbeans.spi.java.project.support.ui.templates.JavaTemplates;
import org.netbeans.spi.project.ui.templates.support.Templates;
import org.openide.WizardDescriptor;
import org.openide.WizardDescriptor.Panel;

/**
 *
 * @author Victor
 */
public class JSONSerializerWizardIterator extends CarmesiWizardIterator{

    @Override
    protected Panel[] createPanels() {
        Project project = Templates.getProject(getWizardDescriptor());
        Sources sources = project.getLookup().lookup(Sources.class);
        SourceGroup[] groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
        Panel<WizardDescriptor> chooser = JavaTemplates.createPackageChooser(project, groups);
        chooser.getComponent().setName("Define JSONSerializer class");
        return new Panel[]{chooser};
    }

}
